package cool.taomu.software.fig.springutils

import org.springframework.context.ApplicationContext

import static cool.taomu.software.fig.springutils.RegisterBeanToSpring.*
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service
import org.springframework.context.ApplicationContextAware

@Service
final class FigSpringPlugin implements ApplicationContextAware{

    val static LOG = LoggerFactory.getLogger(FigSpringPlugin);
    
    ApplicationContext applicationContext;

    override void setApplicationContext(ApplicationContext applicationContext) {
        LOG.info("set ApplicationContext Object")
        this.applicationContext = applicationContext;
        RegisterBeanToSpring.spring = this.applicationContext;
    }
}
